Adding 2 examples on using custom svg shapes #2454
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Last year I was able to get some cool graphs using custom SVG shapes with @jakevdp 's help. I eventually ended up emulating a lot of cool graphs and put them on my project website: https://armsp.github.io/covidviz/
This is a PR that adds simplified examples of just the maps with custom SVG markers.
Example 1: custom_svg_mark_geospatial.py
This example shows how to use custom SVG shapes as marks on Geospatial plots.
Since the data for this plot is not available in vega-datasets, you'd have to download the data hosted on my personal repo - https://github.com/armsp/datasets/blob/master/covid_cases_april_6.csv
Example 2: interactive_time_series_geospatial_chart.py
This example shows how to use range slider that lets you choose a day which is used by the selection to select data only for that day to visualize surge in per-capita cases of covid-19. The marks are custom SVG shapes (a vertical line) on a geospatial plot (it looks like a bar plot on a map). Slide the slider knob to see how the selection changes the data and hence the plot.
Since the data for this plot is not available in vega-datasets, you'd have to download the data hosted on my personal repo - https://github.com/armsp/datasets/blob/master/past_2_weeks_per_capita.csv
Some Issues
There are some guidelines on things to take care of when adding examples. Unfortunately I have broken a few of them. I do not know the best way to fix them. So I am hoping that the maintainers would guide me on the best possible way to fix them so that the PR is in a state that can be merged for the next release cycle.
Things I believe I have not followed -
states
base layer is requested from the CDN providers for us-atlas project : external calls to datamaps
ORother charts